package com.gjy.spring.a01;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @author 宫静雨
 * @version 1.0
 * @since 2023-09-06 20:25:24
 */
@Component
public class Component2 {

    private static final Logger log = LoggerFactory.getLogger(Component2.class);

    @EventListener
    public void listener(UserRegisterEvent event) {
        log.info("event {}", event);
    }

    @EventListener
    public void listener2(UserRegisterEvent event) {
        log.info("event222==== {}", event);
    }
}
